package com.ruoyi.storage.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Objects;

import lombok.Data;

/**
 * 
 * @TableName repo_kc
 */
@TableName(value ="repo_kc")
@Data
public class RepoKc implements Serializable {
    /**
     * 库存信息的id（自增）
     */
    @TableId(type = IdType.AUTO)
    private Integer kcId;

    /**
     * 仓库id
     */
    private Integer repoWareId;

    /**
     * 仓库
     */
    @TableField(exist = false)
    private String repoWare;

    /**
     * 品牌id
     */
    private Integer poBrandId;

    @TableField(exist = false)
    private String brandName;

    /**
     * 类型id
     */
    private Integer poTypeId;

    @TableField(exist = false)
    private String typeName;

    /**
     * 厂商id
     */
    private Integer poFirmId;

    @TableField(exist = false)
    private String firmName;

    /**
     * 商品id
     */
    private Integer poProductId;

    @TableField(exist = false)
    private String productName;

    /**
     * 库存数量
     */
    private Integer kcNum;

    @TableField(exist = false)
    private String unit;

    /**
     * 订单详情编号
     */
    private Integer mkDetailId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RepoKc repoKc = (RepoKc) o;
        return Objects.equals(repoWare, repoKc.repoWare) &&
                Objects.equals(brandName, repoKc.brandName) &&
                Objects.equals(typeName, repoKc.typeName) &&
                Objects.equals(firmName, repoKc.firmName) &&
                Objects.equals(productName, repoKc.productName) &&
                Objects.equals(kcNum, repoKc.kcNum) &&
                Objects.equals(unit, repoKc.unit);
    }

    @Override
    public int hashCode() {
        return Objects.hash(repoWare, brandName, typeName, firmName, productName, kcNum, unit);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", kcId=").append(kcId);
        sb.append(", repoWareId=").append(repoWareId);
        sb.append(", poBrandId=").append(poBrandId);
        sb.append(", poTypeId=").append(poTypeId);
        sb.append(", poFirmId=").append(poFirmId);
        sb.append(", poProductId=").append(poProductId);
        sb.append(", kcNum=").append(kcNum);
        sb.append(", mkDetailId=").append(mkDetailId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}